package com.br.aadb.Managers;

import org.andengine.entity.modifier.DelayModifier;
import org.andengine.entity.modifier.FadeInModifier;
import org.andengine.entity.modifier.FadeOutModifier;
import org.andengine.entity.modifier.LoopEntityModifier;
import org.andengine.entity.modifier.ParallelEntityModifier;
import org.andengine.entity.modifier.ScaleModifier;
import org.andengine.entity.modifier.SequenceEntityModifier;


public class ModifierManager {
	private static ModifierManager INSTANCIA;

	ModifierManager() {

	}

	public synchronized static ModifierManager getInstance() {
		if (INSTANCIA == null) {
			INSTANCIA = new ModifierManager();
		}
		return INSTANCIA;
	}
	
	/**
	 * Retorna o splash do texto inicial
	 * @return LoopEntityModifier
	 */
	public synchronized LoopEntityModifier setSplashLogo(){
		SequenceEntityModifier pSequenceEntityModifier = new SequenceEntityModifier(
				   new ParallelEntityModifier(new FadeInModifier(1f), new ScaleModifier(0.5f, 5f, 1f)),
					new DelayModifier(1f), 
					new FadeOutModifier(1f));
		LoopEntityModifier loop = new LoopEntityModifier(pSequenceEntityModifier);
		return loop;
	}
	
	public synchronized LoopEntityModifier setSplashLogoGame(){
		SequenceEntityModifier pSequenceEntityModifier = new SequenceEntityModifier(
				   new ScaleModifier(0.5f, 1f, 1.1f),
				   new ScaleModifier(0.5f, 1.1f, 1f));

		LoopEntityModifier loop = new LoopEntityModifier(pSequenceEntityModifier);
		return loop;
		
	}

}
